import request from "@/utils/request";

//查询学员列表
export const queryStuList=(name,degree,clazzId,page,pageSize)=>{
    return request.get(`/students?name=${name}&degree=${degree}&clazzId=${clazzId}&page=${page}&pageSize=${pageSize}`);
};

//添加学员
export const addStudentApi=(student)=>{
    return request.post("/students",student);
};

//删除学员
export const deleteStudentApi=(ids)=>{
    return request.delete(`/students/${ids}`);
};

//根据id查询学员
export const queryStuApi=(id)=>{
    return request.get(`/students/${id}`);
};

//修改学员
export const updateStudentApi=(student)=>{
    return request.put("/students",student);
};

//违纪处理
export const punishApi=(id,score)=>{
    return request.put(`/students/violation/${id}/${score}`);
}